package com.ziroom.crm.mq.core.processor.retry.config;

import com.ziroom.crm.mq.core.config.MqConfig;
import com.ziroom.crm.mq.core.processor.retry.DefaultConsumeRetryProcessor;
import com.ziroom.crm.mq.core.retry.RetryConst;
import com.ziroom.crm.mq.core.retry.RetryContext;
import com.ziroom.crm.mq.core.retry.policy.CountRetryPolicy;
import com.ziroom.crm.mq.core.spi.SpiAlias;

import java.util.Date;

/**
 * 用于解析配置，消费端立即重试，数量策略
 * <p/>
 *
 * @author WeiShaoying
 * @date Created in 2020年09月16日 16:05
 * @since 1.0.0
 */
@SpiAlias(value = RetryConst.RETRY_POLICY_COUNT, group = DefaultConsumeRetryProcessor.GROUP_CONSUME)
public class ConsumeCountRetryPolicy extends CountRetryPolicy {

    private static final long serialVersionUID = 4106654028727109211L;

    public ConsumeCountRetryPolicy() {
        super(MqConfig.getConfigInt(MqConfig.RETRY_CONSUME_COUNT, 1));
    }

}
